<template>
  <!-- 申请人信息组件 -->
  <div>
    <h3 v-show="title" class="title">{{title}}</h3>
    <div class="body">
      <!-- 申请人信息 -->
      <div class="self-tab">{{$I18n.reportManInfo}}</div>
      <el-form>
        <!-- 与出险人关系 -->
        <el-form-item :label="$I18n.payeeRelation" required>
          <el-select v-model="fromData.payeeRelation">
            <el-option v-for="item in typeList" :key="item.codeKey" :label="item.codeName" :value="item.codeKey">
            </el-option>
          </el-select>
        </el-form-item>
        <!-- 姓名 -->
        <el-form-item :label="$I18n.name" required>
          <el-input></el-input>
        </el-form-item>
        <!-- 证件类型 -->
        <el-form-item :label="$I18n.cardType" required>
          <el-select v-model="fromData.payeeRelation">
            <el-option v-for="item in typeList" :key="item.codeKey" :label="item.codeName" :value="item.codeKey">
            </el-option>
          </el-select>
        </el-form-item>
        <!-- 证件号码 -->
        <el-form-item :label="$I18n.cardId" required>
          <el-input></el-input>
        </el-form-item>
        <!-- 联系电话 -->
        <el-form-item :label="$I18n.phone" required>
          <el-input></el-input>
        </el-form-item>
        <!-- 联系地址 -->
        <el-form-item :label="$I18n.address">
          <el-input></el-input>
        </el-form-item>
        <!-- 邮箱 -->
        <el-form-item :label="$I18n.email">
          <el-input></el-input>
        </el-form-item>
        <!-- 是否委托他人 -->
        <el-form-item :label="$I18n.isEntrust" class="row">
          <el-checkbox v-model="fromData.isEntrust"></el-checkbox>
        </el-form-item>
      </el-form>
      <el-form v-show="fromData.isEntrust">
        <!-- 受托人 -->
        <el-form-item :label="$I18n.depositaryMan" required>
          <el-input></el-input>
        </el-form-item>
        <!-- 性别 -->
        <el-form-item :label="$I18n.sex" required>
          <el-select v-model="fromData.payeeRelation">
            <el-option v-for="item in typeList" :key="item.codeKey" :label="item.codeName" :value="item.codeKey">
            </el-option>
          </el-select>
        </el-form-item>
        <!-- 证件类型 -->
        <el-form-item :label="$I18n.cardType" required>
          <el-select v-model="fromData.payeeRelation">
            <el-option v-for="item in typeList" :key="item.codeKey" :label="item.codeName" :value="item.codeKey">
            </el-option>
          </el-select>
        </el-form-item>
        <!-- 证件号码 -->
        <el-form-item :label="$I18n.cardId" required>
          <el-input></el-input>
        </el-form-item>
        <!-- 联系电话 -->
        <el-form-item :label="$I18n.phone" required>
          <el-input></el-input>
        </el-form-item>
        <!-- 联系地址 -->
        <el-form-item :label="$I18n.address">
          <el-input></el-input>
        </el-form-item>
      </el-form>
    </div>
  </div>
</template>

<script>
export default {
  props: ['title'],
  data() {
    return {
      fromData: {
        payeeRelation: '',
        isEntrust: true
      },
      typeList: []
    }
  }
}
</script>

<style lang="stylus">

</style>